package qingke.hibernate.bean;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "register")
public class Register {
	@Id
	@Column(name = "id")
	private int id;
	
	@Column(name = "register_time")
	private String createTime;
	
	@ManyToOne
	@JoinColumn(name = "student_id")
	private Student student;
	
	@ManyToOne
	@JoinColumn(name = "school_year_id")
	private SchoolYear schoolYear;
	
	@ManyToOne
	@JoinColumn(name = "major_id")
	private Major major;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}



	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public SchoolYear getSchoolYear() {
		return schoolYear;
	}

	public void setScoolYear(SchoolYear schoolYear) {
		this.schoolYear = schoolYear;
	}

	public Major getMajor() {
		return major;
	}

	public void setMajor(Major major) {
		this.major = major;
	}

	@Override
	public String toString() {
		return "Register [id=" + id + ", createTime=" + createTime + "]";
	}
	
	
}
